package com.example.personnel_oa.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.comment_oa.pojos.Jobrequirements;
import com.example.comment_oa.pojos_vo.Talentpool_vo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author asus
* @description 针对表【jobrequirements】的数据库操作Mapper
* @createDate 2022-10-17 19:16:24
* @Entity personnel_oa.pojos.Jobrequirements
*/
@Mapper
public interface JobrequirementsMapper extends BaseMapper<Jobrequirements> {
        //查询全部数据
        List<Jobrequirements> selectjob();
        //查询岗位需求人数
        @Select("SELECT sum(job_number) FROM jobrequirements WHERE job_status=1 and job_poststatus != 4")
        int countJob();
        //高级查询
        List<Jobrequirements> selectAlljob(Talentpool_vo talentpoolVo);
        //查询岗位需求记录
        List<Jobrequirements> fabujilu(int jobId);
        //查询申请人
        Jobrequirements shrnqingren(int jobid);
        //添加用工需求申请
        int addjob(Jobrequirements job);
        //发布详情页面
        Jobrequirements selectjobId(int jobId);
        //流程查看用工需求申请，根据编号查询数据
        Jobrequirements bianhao(String jobBianhao);
        //发布功能，修改状态
        int upstatus(int jobId);
        //修改岗位需求数据
        int upJob(Jobrequirements job);
        //撤回功能，修改状态
        int upstatus2(int jobId);
        //重新发布功能，修改状态
        int upstatus3(int jobId);
        //关闭发布功能，修改状态
        int upstatus4(int jobId);
        //流程审批成功
        int jobStatus(String jobPostname,String jobBianhao);
        //流程审批失败
        int jobStatuss(String jobPostname,String jobBianhao);


}
